-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eip4844 Point Evaluation precompile #2701
base: master
Are you sure you want to change the base?
Conversation
@@ -2414,6 +2438,7 @@ The intrinsic gas calculation mirrors the style of the YellowPaper (appendix H). | |||
rule <k> #gasExec(SCHED, ECMUL) => Gecmul < SCHED > ... </k> | |||
rule <k> #gasExec(SCHED, ECPAIRING) => Gecpairconst < SCHED > +Int (lengthBytes(DATA) /Int 192) *Int Gecpaircoeff < SCHED > ... </k> <callData> DATA </callData> | |||
rule <k> #gasExec(SCHED, BLAKE2F) => Gfround < SCHED > *Int #asWord(#range(DATA, 0, 4) ) ... </k> <callData> DATA </callData> | |||
rule <k> #gasExec(_, KZGPOINTEVAL) => 50000 ... </k> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to use a schedule variable here,
rule <k> #gasExec(_, KZGPOINTEVAL) => 50000 ... </k> | |
rule <k> #gasExec(SCHED , KZGPOINTEVAL) => Gpointeval < SCHED > ... </k> |
Where Gpointeval
would be defined in schedule.md
as
rule Gpointeval < DEFAULT > => 0
rule Gpointeval < CANCUN > => 50000
This ensures that the 50000
value is preserved and can be updated dynamically in future hardforks without modifying this rule directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, I believe I addressed it.
Co-authored-by: Andrei Văcaru <[email protected]>
Co-authored-by: Andrei Văcaru <[email protected]>
This PR implements the point evaluation precompile for EIP-4844. It relies on this PR, that implements a new hook for
verify_kzg_proof
in the blockchain-k-plugin.